<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexUserIdAndPartnerInTaskMember extends AbstractMigration
{
    public function up()
    {
        $this->table('task_member')
            ->addIndex(['partner'],['name' => 'idx_partner_index', 'type' => 'normal'])
            ->addIndex(['user_id'],['name' => 'idx_user_id_index', 'type' => 'normal'])
            ->save();
    }

    public function down()
    {
        $this->table('task_member')
            ->removeIndexByName('idx_partner_index')
            ->removeIndexByName('idx_user_id_index')
            ->save();
    }
}
